package com.ch.design.kingdom;

/**
 * 懒汉模式
 *
 * @author CH
 * @date 2022/2/22
 */
public class King02 {
    private static King02 king = null;
    private String name = "国王";
    private void king02() {
    }

    public static King02 getKing() {
        if (king == null) {
            king = new King02();
        }
        return king;
    }

}
